#include "sys.h"

const unsigned char src1[33]={
    0x78,0x9c,0xed,0xc1,0x01,0x09,0x00,0x00,
    0x00,0x02,0xa0,0xfe,0x9f,0xae,0x1d,0x81,
    0x9a,0x00,0x00,0x00,0x00,0x7c,0x2b,0x00,
    0x00,0x00,0xc0,0xb9,0x01,0x77,0xac,0xd0,
    0x11	
};	//全绿
const unsigned char src2[33]={
    0x78,0x9c,0xed,0xc1,0x01,0x09,0x00,0x00,
    0x00,0x02,0xa0,0xfe,0x9f,0xae,0x1d,0x81,
    0xda,0x02,0x00,0x00,0x00,0x7c,0x0b,0x00,
    0x00,0x00,0xc0,0xb9,0x01,0x53,0x74,0xd0,
    0x11	
};	//全红

unsigned char buffer[11] = 
{
    0x78,0x9c,0x4b,0x4c,0x04,0x03,0x00,0x0a,
    0xa3,0x02,0xa8
};

unsigned char strDst[10240] = {0};

int main(void)
{
    unsigned long dstLen = 0;
    uint32_t i = 0;

    sys_ini();

    for(i=0;i<10240;i++)
	{
        strDst[i]=0xcf;
	}

    dstLen=sizeof(strDst);

    i=uncompress(strDst,&dstLen,buffer,11);
    //i=uncompress(strDst,&dstLen,src2,33);

    for(i=0;i<dstLen;i++)
	{
        USART_SendData(USART1,strDst[i]);	//帧开始
        while(USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET);
	}

    while(1)
	{
        
	}
}
